-
Notifications
You must be signed in to change notification settings - Fork 329
fix(crop): modify the saas theme style #3791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughCSS styling modifications to the crop theme component. Adds visibility rules hiding specific icon button children and introduces a new split modifier class for icon buttons with pixel-width and zero left-margin properties. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/theme-saas/src/crop/index.less (2)
1-588: Consider adding tests and documentation for CSS visual behavior changes.This PR makes visual modifications to the crop component (hiding specific buttons, adding a separator style) but the PR checklist indicates tests and docs were not added. For CSS changes that affect user-facing layout and button visibility, consider:
- Visual regression tests: Capture snapshots of the crop component with the new styles to catch unintended visual regressions.
- Documentation: Document why specific iconButton children are hidden (indices 2, 7, 10) and what the split modifier represents, perhaps via inline comments or a design system guide.
- E2E tests: If the hidden buttons affect user workflows, verify the intended behavior is preserved.
These will help future maintainers understand the design intent and catch breakage early.
10-14: Refactor nth-child hiding to use semantic.iconButton__splitselector.The nth-child(2, 7, 10) selectors hide visual separators in the toolbar, but this approach is brittle—any reordering of the renderIcon array breaks the styling. Since the template already marks separators with the semantic class
iconButton__split, use that instead:.iconButton:nth-child(2), .iconButton:nth-child(7), .iconButton:nth-child(10) { display: none; }Replace with:
.iconButton__split { display: none; }This eliminates the maintainability risk while leveraging the existing semantic markup.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/theme-saas/src/crop/index.less(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: PR Unit Test
🔇 Additional comments (1)
packages/theme-saas/src/crop/index.less (1)
543-546: TheiconButton__splitclass is properly implemented and actively used.The class is correctly defined with BEM naming and standard Tailwind utilities (w-px for 1px width, ml-0 for zero left margin). It is actively applied in the Vue component template as a conditional visual divider:
<div v-else class="iconButton__split"></div>inpackages/vue/src/crop/src/pc.vue. The implementation is complete and intentional.
PR
修改前:


修改后:
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information